/*

  The contents of this file are subject to the Mozilla Public License Version
  1.1 (the "License"); you may not use this file except in compliance with
  the License. You may obtain a copy of the License at 
  
           http://www.mozilla.org/MPL/ 
  
  Software distributed under the License is distributed on an "AS IS" basis,
  WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  for the specific language governing rights and limitations under the License. 
  
  The Original Code is Tamina Framework.
  
  The Initial Developer of the Original Code is
  MOUTON David (aka damo)  <damo@tamina-online.com>.
  Portions created by the Initial Developer are Copyright (C) 2004-2007
  the Initial Developer. All Rights Reserved.
  
  Contributor(s) :
  
*/
package org.tamina.core.application
{
	public const ApplicationParams:_ApplicationParams = new _ApplicationParams();
}
	import flash.events.EventDispatcher;
	import flash.events.TimerEvent;
	import flash.utils.Timer;
	
	import org.tamina.core.init.IInitializable;
	import org.tamina.core.init.InitEvent;
	
internal class _ApplicationParams extends EventDispatcher implements IInitializable
{
	//Props
	private const CLASS_NAME:String="ApplicationParams";
	private var __isInitialized:Boolean=false;
	
	public var urlImage:String;
	public var urlPortail:String;
	public var ChatMessenger:String;
	public var ChatRemoter:String;
	public var UserMessenger:String;
	public var UserRemoter:String;
	public var urlStyleSheet:String;
	
	
	//Constructeur
	function _ApplicationParams(){
		
	}
	
	//Methodes publiques
	
	/**
	 * Debute l'initialisation
	 * 
	 */	
	public function init():void{
		trace("ApplicationParams : debut d'initialisation ");
		var validTimer:Timer = new Timer(500,1);
		validTimer.addEventListener(TimerEvent.TIMER_COMPLETE,endInit);
		validTimer.start();
	}
	
	/**
	 * Retourne le nom de la classe
	 * @return 
	 * 
	 */	
	public function getName():String{
		return CLASS_NAME;
	}

	
	//Methodes privées
	private function endInit(e:TimerEvent):void{		
		__isInitialized = true;
		dispatchEvent(new InitEvent(InitEvent.INITIALIZED));
	}

}